package com.cskaoyan.service.admin;

import com.cskaoyan.bean.MarketBrand;
import com.cskaoyan.bean.MarketCategory;
import com.cskaoyan.bean.bo.admin.category.MarketCategoryUpdateBo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.vo.admin.category.MarketCategoryCreateVo;
import com.cskaoyan.bean.vo.admin.category.MarketCategoryL1Vo;
import com.cskaoyan.bean.vo.admin.category.MarketCategoryListVo;
import com.cskaoyan.bean.vo.wx.CategoryVO;
import com.cskaoyan.bean.vo.wx.ListCategoryVO;

import java.sql.SQLException;
import java.util.List;

/**
 * 商场管理/品牌制造商模块的service层
 *
 * @Author: zhang
 * @Date: 2022/11/20 15:28
 * @Since: jdk1.8
 */
public interface MarketCategoryService {
    /**
     * 查询所有的品牌信息
     *
     * @return CommonData<MarketCategory>
     */
    CommonData<MarketCategoryListVo> list();

    /**
     * 创建品类
     *
     * @param marketCategory 品类信息
     * @return MarketCategoryCreateVo
     * @throws SQLException 插入数据库失败
     */
    MarketCategoryCreateVo create(MarketCategory marketCategory) throws SQLException;

    /**
     * 修改品牌信息
     *
     * @param marketCategoryUpdateBo 要修改的品牌信息
     * @return 影响的行数
     */
    int update(MarketCategoryUpdateBo marketCategoryUpdateBo);

    /**
     * 删除品类
     *
     * @param marketCategoryUpdateBo 要删除的品类信息
     * @return 影响的行数
     */
    int delete(MarketCategoryUpdateBo marketCategoryUpdateBo);

    /**
     * 查询所有的1级类目
     *
     * @return CommonData<MarketCategoryL1Vo>
     */
    CommonData<MarketCategoryL1Vo> l1();

    CategoryVO selectCategoryDetail(Integer id);

    ListCategoryVO getListCategoryVO(String categoryId, int page, int limit);

    List<MarketCategory> queryL2ByIds(List<Integer> ids);

}
